package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 评论实体类
 */
@TableName("t_speakInfo")
public class InfoBean {
    /**编号*/
    @TableId(value = "pk_infoId",type = IdType.AUTO)
    private Integer id;
    /**内容*/
    @TableField("i_content")
    private String content;
    /**用户ID*/
    @TableField("fk_userId")
    private Integer userId;
    /**用户对象*/
    @TableField(exist = false)
    private UserBean userObj;
    /**商品ID*/
    @TableField("fk_productId")
    private Integer productId;

    public InfoBean(String content, Integer userId, Integer productId) {
        this.content = content;
        this.userId = userId;
        this.productId = productId;
    }

    public InfoBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public UserBean getUserObj() {
        return userObj;
    }

    public void setUserObj(UserBean userObj) {
        this.userObj = userObj;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Override
    public String toString() {
        return "InfoBean{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", userId=" + userId +
                ", userObj=" + userObj +
                ", productId=" + productId +
                '}';
    }
}
